1. Field of the Invention
The present invention relates to an apparatus for and a method of converting a format of a video signal, and more particularly, to an apparatus for and a method of adaptive motion compensated de-interlacing of video data, in which either a spatio-temporal method of interpolation or a motion compensation method of interpolation is adaptively selected according to a motion type.
2. Description of the Related Art
Interlaced scanning in which two fields form a single frame is usually applied to a television video signal. To display interlaced video on a screen of a recent personal computer (PC) or high definition television which displays images usually using progressive scanning, it is necessary to generate video lines to fill blank lines using a de-interlacing method.
FIG. 1 is a basic conceptional diagram of typical conventional de-interlacing. Referring to FIG. 1, de-interlacing is used to convert a field including odd or even samples in a vertical direction into a frame. An output frame F0({right arrow over (x)},n) is defined as Equation (1).
                                          F            0                    ⁡                      (                                          x                →                            ,              n                        )                          =                  {                                                                                          F                    ⁡                                          (                                                                        x                          →                                                ,                        n                                            )                                                        ,                                                                                                  (                                                                  y                        ⁢                                                                                                  ⁢                        mod                        ⁢                                                                                                  ⁢                        2                                            =                                              n                        ⁢                                                                                                  ⁢                        mod                        ⁢                                                                                                  ⁢                        2                                                              )                                    ,                                                                                                                                                F                      i                                        ⁡                                          (                                                                        x                          →                                                ,                        n                                            )                                                        ,                                                            otherwise                                                                        (        1        )            Here, {right arrow over (x)} denotes a spatial position, n denotes a field number, F({right arrow over (x)},n) denotes an input field, and F1({right arrow over (x)},n) denotes an interpolated pixel. In the expressions y mod 2 and n mod 2, “mod” represents a module operation which gives a remainder after a division. For example, 5 mod 2=1, 4 mod 2=0, 3 mod 2=1 and 2 mod 2=0.
FIG. 2 shows a 3 pixel×3 pixel window in which a conventional Edge-based Line Averaging (ELA) de-interlacing algorithm which does not use motion compensation is applied. Referring to FIG. 2, ELA de-interlacing uses correlation between pixels with regard to a directivity (x,y) at a position of a pixel to be interpolated, as shown in Equation (2). In other words, an average value of pixels to be interpolated is obtained using pixels adjacent to the pixels to be interpolated.
                                          F            0                    ⁡                      (                                          x                →                            ,              n                        )                          =                  {                                                                                                                                        F                        ⁡                                                  (                                                                                                                    x                                →                                                            -                                                                                                u                                  x                                                                →                                                            -                                                                                                u                                  y                                                                →                                                                                      ,                            n                                                    )                                                                    +                                                                        F                          ⁡                                                      (                                                                                                                            x                                  →                                                                +                                                                                                      u                                    x                                                                    →                                                                -                                                                                                      u                                    y                                                                    →                                                                                            ,                              n                                                        )                                                                          /                        2                                                              ,                                                                                                                                      if                        ⁢                                                                                                  ⁢                        a                                            <                                              b                        ⁢                                                                                                  ⁢                        and                        ⁢                                                                                                  ⁢                        a                                            <                      c                                        ,                                                                                                                                                                  F                        ⁡                                                  (                                                                                                                    x                                →                                                            -                                                                                                u                                  x                                                                →                                                            +                                                                                                u                                  y                                                                →                                                                                      ,                            n                                                    )                                                                    +                                                                        F                          ⁡                                                      (                                                                                                                            x                                  →                                                                +                                                                                                      u                                    x                                                                    →                                                                -                                                                                                      u                                    y                                                                    →                                                                                            ,                              n                                                        )                                                                          /                        2                                                              ,                                                                                                                                      if                        ⁢                                                                                                  ⁢                        b                                            >                                              a                        ⁢                                                                                                  ⁢                        and                        ⁢                                                                                                  ⁢                        b                                            <                      c                                        ,                                                                                                                                        ⁢                                                                                            F                          ⁡                                                      (                                                                                                                            x                                  →                                                                -                                                                                                      u                                    y                                                                    →                                                                                            ,                              n                                                        )                                                                          +                                                                              F                            ⁡                                                          (                                                                                                                                    x                                    →                                                                    +                                                                                                            u                                      y                                                                        →                                                                                                  ,                                n                                                            )                                                                                /                          2                                                                    ,                                                                                                            (                    otherwise                    )                                                                        ⁢                                                  ⁢                                                                                Here                    ,                                          a                      =                                                                                                                            F                            ⁡                                                          (                                                                                                                                    x                                    →                                                                    -                                                                                                            u                                      x                                                                        →                                                                    -                                                                                                            u                                      y                                                                        →                                                                                                  ,                                n                                                            )                                                                                -                                                      F                            ⁡                                                          (                                                                                                                                    x                                    →                                                                    +                                                                                                            u                                      x                                                                        →                                                                    +                                                                                                            u                                      y                                                                        →                                                                                                  ,                                n                                                            )                                                                                                                                                                                                                                                                    b                    =                                                                                                                  F                          ⁡                                                      (                                                                                                                            x                                  →                                                                -                                                                                                      u                                    x                                                                    →                                                                +                                                                                                      u                                    y                                                                    →                                                                                            ,                              n                                                        )                                                                          -                                                  F                          ⁡                                                      (                                                                                                                            x                                  →                                                                +                                                                                                      u                                    x                                                                    →                                                                -                                                                                                      u                                    y                                                                    →                                                                                            ,                              n                                                        )                                                                                                                                                                                                                                      c                    =                                                                                                                                                F                            ⁡                                                          (                                                                                                                                    x                                    →                                                                    -                                                                                                            u                                      y                                                                        →                                                                                                  ,                                n                                                            )                                                                                -                                                      F                            ⁡                                                          (                                                                                                                                    x                                    →                                                                    +                                                                                                            u                                      y                                                                        →                                                                                                  ,                                n                                                            )                                                                                                                                                  .                                                                                                                              (        2        )            
FIG. 3 is a conceptional diagram of a typical conventional time-recursive (TR) de-interlacing method. Referring to FIG. 3, in TR de-interlacing using a motion vector, it is assumed that an (n−1)-th field is completely de-interlaced, and missing data of an n-th field is compensated for using a motion vector. A sample to be interpolated may be an original sample in the (n−1)-th field or an interpolated sample in the (n−1)-th field. Accordingly, the sample to be interpolated can be expressed by Equation (3).
                                          F            0                    ⁡                      (                                          x                →                            ,              n                        )                          =                  {                                                                                          F                    ⁡                                          (                                                                        x                          →                                                ,                        n                                            )                                                        ,                                                                              (                                                            y                      ⁢                                                                                          ⁢                      mod                      ⁢                                                                                          ⁢                      2                                        =                                          n                      ⁢                                                                                          ⁢                      mod                      ⁢                                                                                          ⁢                      2                                                        )                                                                                                                          F                    ⁡                                          (                                                                                                    x                            →                                                    -                                                                                    d                              →                                                        ⁡                                                          (                                                                                                x                                  →                                                                ,                                n                                                            )                                                                                                      ,                                                  n                          -                          1                                                                    )                                                        ,                                                            otherwise                                                                        (        3        )            
However, since an ELA de-interlacing method does not use motion compensation, flickering and blurring occur in an area in which there is motion. Since a TR de-interlacing method performs de-interlacing consecutively, an error in one field may be propagated to another field. Further, a conventional motion compensation method has a disadvantage of generation of image artifacts.